from selenium import webdriver
from selenium.webdriver.common.by import By
import time
from until_02.Mysql import Mysql
driver = webdriver.Edge()
driver.get('http://10.59.9.14:7003/')
ma = Mysql(host='10.59.9.14',user='root',password='yidong666',database='a3mall')
# 点击登录
driver.find_element(By.XPATH,'/html/body/div[1]/div/div[2]/ul/li[1]/a').click()
time.sleep(2)
# 输入账号密码
driver.find_element(By.CLASS_NAME,'regi-input').send_keys('15232008902')
driver.find_element(By.NAME,'password').send_keys('123456')
time.sleep(15)
da2= ma.chaxun("select * from mall_users where mobile =15232008902")

print(da2)
# 相对点击登录
driver.find_element(By.XPATH,'/html/body/div[4]/div/div[1]/div[2]/form/div[5]/a').click()
time.sleep(2)